import Vue from 'vue';
const prefix = 'health-box-api/v1/notifications';

/**
 * 查看健康状态
 */
export const getHealthState = (phoneNum) => {
  return Vue.$http({
    url: prefix + '/healthstate/get',
    method: 'get',
    data: phoneNum,
  });
};

/**
 * 变更当前所在地
 */
export const updateHealthState = (healthstate) => {
  return Vue.$http({
    url: prefix + '/healthstate/update',
    method: 'put',
    headers: {
      'content-type': 'application/json'
    },
    data: healthstate,
  });
};

/**
 * 填写报备信息
 */
export const addReportInfo = (reportinfo) => {
  return Vue.$http({
    url: prefix + '/reportinfo/add',
    method: 'post',
    headers: {
      'content-type': 'application/json',
    },
    data: reportinfo,
  })
};

/**
 * 查看历史报备信息
 */
export const getReportInfoList = (phoneNum) => {
  return Vue.$http({
    url: prefix + '/reportinfo/get',
    method: 'get',
    data: phoneNum,
  })
};